package com.crm.task;


import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;


/**
 * 货运异常检测
 */
@Slf4j
@Service
public class AsyncTrackTask {


    @Async("asyncTrack")
    //@Scheduled(cron = "0 0 5 * * *")
    //@Scheduled(cron = " */5 * * * * ?")
    @Scheduled(cron = "0 15 4 * * *")
    public void asyncTrack() throws Exception {
        log.info("<asyncTrack> sart");
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("Exception");
        arrayList.add("DeliveryFailure");
        arrayList.add("Expired");
        arrayList.add("NotFound");
        log.info("<asyncTrack> end");
    }
}
